﻿using System;

namespace KWatkins.FluentMoqBuilder.Argument
{
	internal abstract class ArgumentValidation<T>
	{
		private readonly T argument;
		private readonly string parameterName;

		internal ArgumentValidation(T argument, string parameterName)
		{
			if (parameterName == null)
			{
				throw new ArgumentNullException("parameterName");
			}
			if (parameterName.Length == 0)
			{
				throw new ArgumentException("Value cannot be empty.", "parameterName");
			}

			this.argument = argument;
			this.parameterName = parameterName;
		}

		protected internal T Argument
		{
			get
			{
				return argument;
			}
		}
		protected internal string ParameterName
		{
			get
			{
				return parameterName;
			}
		}
	}
}
